

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>数据字典新增</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <#include "../../include/layui.ftl" />
</head>
<body>

  <div class="layui-fluid">
    <div class="layui-card">
      <div class="layui-card-body" style="padding: 15px;">
        <form class="layui-form layui-form-pane" action="/console/com.fs.common.pojo.Dictionary/newAdd" lay-filter="layer-from">
          <input type="hidden" name="parentId">
          <input type="hidden" name="parCode">
          <div class="layui-form-item">
            <label class="layui-form-label">父字典</label>
            <div class="layui-input-block">
              <input type="text" name="pmenuName" autocomplete="off" class="layui-input" readonly>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">字典编码</label>
            <div class="layui-input-block">
              <input type="text" name="dicCode" lay-verify="required" autocomplete="off" placeholder="请输入字典编码" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">字典名称</label>
            <div class="layui-input-block">
              <input type="text" name="dicName" lay-verify="required" autocomplete="off" placeholder="请输入字典名称" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">字典值</label>
            <div class="layui-input-block">
              <input type="text" name="dicValue" lay-verify="" autocomplete="off" placeholder="请输入字典值" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">字典排序</label>
            <div class="layui-input-block">
              <input type="text" name="dicOrder" lay-verify="required|number" autocomplete="off" placeholder="请输入字典排序" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item" hidden>
            <div class="layui-input-block">
              <button id="permissionSubmit" class="layui-btn" lay-submit lay-filter="*">
                保存
              </button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>


  <script>
  layui.config({
    base: '${path}/plug-in/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index','form','jquery'],function () {
    var form = layui.form,
           $ = layui.$;
    var parentId = "0";
    var parCode = "";
    var pmenuName = "无";
    if(!$.isEmptyObject(parent._data)){
      parentId = parent._data.id;
      parCode = parent._data.dicCode;
      pmenuName = parent._data.dicName;
    }
    form.val("layer-from",{
        "parentId":parentId,
        "parCode":parCode,
        "pmenuName":pmenuName
    })

  });
  </script>
</body>
</html>
